Add CI that builds and runs every example#598
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a comprehensive GitHub Actions CI system to build and (where possible) run every example in this repository against wolfSSL master and the latest stable tag(s), using a manifest-driven matrix so failures are isolated to per-example jobs.
Changes:
- Introduces manifest-driven CI workflows (host/emulated/cross) plus a nightly triage workflow that retries, classifies flakes vs real failures, and can file/update issues.
- Adds Python harness/scripts to generate matrices, enforce “coverage” (no buildable example directory left unaccounted for), run examples with output assertions, and collect artifacts for triage.
- Updates many examples/Makefiles/scripts/fixtures so they build/run reliably under CI (exit statuses, paths to certs, linking flags, regenerated CRL/certs, etc.).
Reviewed changes
Copilot reviewed 62 out of 64 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| X9.146/Makefile | Makefile header tweak for X9.146 examples |
| x509_acert/README.md | Fix build/run instructions and cert paths |
| x509_acert/Makefile | Make OpenSSL prefix optional; adjust lib paths |
| uefi-static/Makefile | Make libgcc/gnu-efi paths less distro-specific |
| tls/server-tls13.c | Ensure successful exit status after shutdown |
| tls/server-tls13-certauth-clienthello.c | Ensure successful exit status after shutdown |
| tls/server-tls-posthsauth.c | Ensure successful exit status after shutdown |
| tls/client-tls13-resume.c | Load client cert/key and CA separately |
| tls/client-tls.c | Load client cert/key and CA separately |
| staticmemory/memory-bucket-optimizer/tester/Makefile | Add include/lib paths for wolfSSL |
| staticmemory/memory-bucket-optimizer/optimizer/Makefile | Add include/lib paths for wolfSSL |
| staticmemory/Makefile | Correct Makefile title/comment |
| signature/sigtest/Makefile | Make OpenSSL path optional and clearer |
| SGX_Linux/sgx_t.mk | Update SGX C++ runtime library name |
| scripts/run-all-examples.sh | Add local manifest-driven runner script |
| psa/Makefile | Fix include path and guard empty PSA_INCLUDE |
| pq/stateful_hash_sig/xmss_example.c | Remove redundant include |
| pq/stateful_hash_sig/lms_example.c | Remove redundant include |
| pq/ml_kem/README.md | Switch build instructions to make |
| pq/ml_kem/ml_kem.c | Update include/header usage; simplify main signature |
| pq/ml_kem/Makefile | Add Makefile for ML-KEM example |
| pq/ml_dsa/ml_dsa.c | Update to FIPS 204 ctx APIs; fix exit code |
| pq/ml_dsa/Makefile | Fix clean target artifacts list |
| pkcs7/scripts/runall.sh | Fix ordering + ensure failures exit non-zero |
| pkcs7/scripts/openssl-verify.sh | Gate on runall, add failure accounting, improve checks |
| pkcs7/Makefile | Correct Makefile title and zlib comment |
| pkcs11/Makefile | Correct Makefile title/comment |
| pk/srp/Makefile | Fix WOLFSSL_INSTALL_DIR prefix |
| pk/enc-through-sign-rsa/rsa-public-decrypt-app.c | Normalize return code from length-returning API |
| embedded/Makefile | Adjust linux-specific target list handling |
| ecc/ecc-params.c | Handle negative lengths; normalize exit status |
| ebpf/tls-uprobe-trace/Makefile | Add wolfSSL include/lib flags |
| dtls/server-dtls-rw-threads.c | Fix cert paths for CI execution |
| dtls/client-dtls-rw-threads.c | Fix cert paths for CI execution |
| custom-io-callbacks/file-server/file-server.c | Fix server return codes / cleanup flow |
| custom-io-callbacks/file-server/check.sh | Make server/client orchestration bounded and reliable |
| custom-io-callbacks/file-client/file-client.c | Fix client return codes |
| crypto/keywrap/Makefile | Add Makefile for keywrap example |
| crypto/aes-modes/aes-xts.c | Fix XTS key halves to be distinct |
| certvfy/Makefile | Add include/lib flags for wolfSSL |
| certs/crl/regenerate-crl.sh | Add script to regenerate CRL fixture |
| certs/crl/crl.pem | Update CRL fixture to unexpired version |
| certmanager/README.md | Fix example invocation name |
| certmanager/certverify.c | Ensure successful exit status |
| certmanager/certloadverifybuffer.c | Update embedded cert fixtures |
| certgen/Makefile | Add Makefile header/comment |
| certgen/csr_w_ed25519_example.c | Normalize return code from length-returning API |
| can-bus/Makefile | Add include/lib flags for wolfSSL |
| can-bus/generate_ssl.sh | Cap CN length to X.509 limits |
| btle/common/btle-sim.c | Ignore SIGPIPE to avoid FIFO-close crashes |
| .gitignore | Ignore new binaries/pycache; fix typo |
| .github/workflows/nightly.yml | Add scheduled nightly orchestration |
| .github/workflows/examples.yml | Add host-tier matrix workflow + coverage gate |
| .github/workflows/emulated.yml | Add emulated-tier workflow (TPM/SGX/CAN/UEFI) |
| .github/workflows/cross-build.yml | Add cross-build workflow (ESP32/Pico/etc.) |
| .github/workflows/ci-triage.yml | Add triage workflow for nightly results |
| .github/workflows/_resolve-wolfssl.yml | Add reusable wolfSSL ref resolution workflow |
| .github/scripts/run_example.py | Add example harness (build/run/assert/output/artifacts) |
| .github/scripts/manifest.py | Add manifest loader + matrix generator + coverage checker |
| .github/scripts/issue_store.py | Add issue identity/body/state machine + scrubbing |
| .github/scripts/ci_triage.py | Add triage logic (retry, classify, issues, AI advisory) |
| .github/examples-manifest.yml | Add source-of-truth manifest for CI coverage/matrix |
| .github/actions/setup-wolfssl/action.yml | Add composite action to build/cache/install wolfSSL |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
56d67ec to
f0f3a18
Compare
0ffccd5 to
f4fd5e6
Compare
|
General comment: I'd argue the build+test scripts should not live in the CI dir, and should not be shell scripts. Ofc, keep the ones that don't fit that model (eg Android) |
…nputs into the check targets
…heck is not a false pass
…ep that BSD make lacks
… pipefail grep so they hold under BSD make
Adds CI that builds and runs every example against wolfSSL master and the latest stable tag, asserting on real output — not just exit 0 — and fixes the example bugs that blocked those runs from going green.
hashfailing in the nightly aidangarske/wolfssl-examples#2CI
run_example.py+examples-manifest.yml): build → run → assert expected output.Fixes
Each is its own commit:
-1; they now fail when they should.Upstream wolfSSL bugs this CI surfaced
Examples are marked known-fail and gated per ref with
fixed_on; drop the marker when each merges:wc_ecc_verify_hashon a label-generated EC key returnsWC_HW_E(-248): Set label and ID on PKCS11 EC public key wolfssl#10954 (in review)